[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 GETTOKEN() (STRING)

 Function
  Retrieve the next string token from a prior call to TOKENIZE.
  (Same as the GETTOKEN statement but can be used in an
   expression without prior assignement to a variable)

 Syntax
  GETTOKEN()   No arguments are required

 Return Type & Value
  STRING
  Returns the next available token from the most recent TOKENIZE statement.

 Remarks
  One of the strongest features of PCBoard is it's ability to take a
  series of stacked parameters from a command line and use them all at
  once instead of requiring the user to navigate a series of menus and
  select one option at each step of the way.  The TOKENIZE statement is the
  PPL equivalent of what PCBoard uses to break a command line into
  individual commands (tokens).  The number of tokens available may be
  accessed via TOKCOUNT(), and each token may be accessed, one at a time,
  by GETTOKEN and/or GETTOKEN().

  Accessing a token REMOVES it from the token list.  That is, GETTOKEN and
  GETTOKEN() remove the accessed token so that the next GETTOKEN or
  GETTOKEN() gets the next token in the list.

 Examples
  STRING  cmdline
  INPUT "Command",cmdline
  TOKENIZE cmdline
  PRINTLN "You entered ",TOKCOUNT()," tokens"
  WHILE (TOKCOUNT() > 0) DO
    LET cmdline = GETTOKEN()
    PRINTLN "Token:  ",CHR(34),cmdline,CHR(34)
  ENDWHILE

See Also: GETTOKEN TOKCOUNT() TOKENIZE TOKENSTR()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson